The relevant documentation seems to explain that when asynchronous agents are enabled global variables are not thread safe. Is this true? If I have two agents each of which declare a global object of the same name and they run simultaneously am I risking any interference? What about if it is multiple instances of the same agent? At what point do I have to worry about stomping on another agent's globals?
Josh
- LotusScript is thread safe; multiple LotusScript Web agents can run concurrently within the Domino server.
A thread is an instance of LotusScript, in this case an agent. All threads execute in the same memory space. LotusScript threads have no protection against updates on global variables or contention on the various internal data structures. By running multiple agents, you synchronize instances of LotusScript running against each other.
LotusScript agents run as separate threads in the same HTTP process. A process is a collection of one or more threads executing a single application.